Ext.define('Admin.common.panel.EchartsPanel', {
    extend: 'Ext.Container',
    xtype : 'echartspanel',
    option: {
      title: {
        show: false
          // text: '',
          // left: 'center',
          // bottom: 'bottom',
          // textStyle: {
          //   fontSize: 16,
          //   fontWeight: 600,
          // }
      },
      grid: {
        top: 30,
        right: 0,
        bottom: 30,
        left: 50,
      },
      tooltip: {},
      legend: {
          data:['方案']
      },
      xAxis: {
          type : 'category',
          data: []
      },
      yAxis: {
        name: 'test',
        offset: 0,
        nameLocation: 'end'
      },
      series: [{
          name: '',
          type: 'bar',
          barMaxWidth: 20,
          data: []
      }]
    },
    initComponent: function() {
        var me = this;
        me.on("boxready", function () {
        me.echarts = echarts.init(me.getEl().dom);
        if (me.option) {
            me.option.yAxis.name = me.yName;
            // me.option.title.text = me.etitle;
            me.option.xAxis.data = me.xdata;
            me.option.series[0].name = me.etitle;
            me.option.series[0].data = me.ydata;
            me.echarts.setOption(me.option);
        }
        });
        me.callParent();
    },

});
